"""
URL configuration for kursachBackend project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apiapp import views
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView, SpectacularRedocView

urlpatterns = [
    path('api/v1/register/', views.UserRegisterView.as_view(), name='user-register'),
    path('api/v1/login/', views.UserLoginView.as_view(), name='user-login'),
    path('api/v1/tour/', views.TourView.as_view(), name='tour'),
    path('api/v1/tour/<int:id>', views.TourDetailView.as_view()),
    path('api/v1/user', views.UserView.as_view()),
    path('api/v1/generate', views.TourDescriptionView.as_view()),
    path('api/v1/tour/<int:id>/book', views.TourBookView.as_view()),
    path('api/v1/tour/<int:id>/users', views.TourUsersView.as_view()),
    path('api/v1/user/tours', views.AllUserToursView.as_view()),
    path('api/v1/ympay', views.YooMoneyPaidView.as_view()),

    # Docs:
    path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
    # Optional UI:
    path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
    path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
]
